package db

const TableNameVIPReward = TablePrefix + "vip_reward"

type VIPReward struct {
	BaseModel
	VipID      uint  `gorm:"column:vip_id;type:int(11);default:0;comment:月卡id" json:"vipID" from:"vipID"`                   //月卡id
	TypeID     uint  `gorm:"column:type_id;type:int(11);default:0;comment:类型id" json:"typeID" form:"typeID"`                // 类型id
	TypeCardID uint  `gorm:"column:type_card_id;type:int(11);default:0;comment:卡牌类型id" json:"typeCardID" form:"typeCardID"` // 卡牌类型id
	Num        int64 `gorm:"column:num;type:int(11);default:0;comment:数量" json:"num" form:"num"`                            // 数量
	Rate       int64 `gorm:"column:rate;type:int(11);default:0;comment:日产值" json:"rate" form:"rate"`                        // 日产值
}

func (*VIPReward) TableName() string {
	return TableNameVIPReward
}

type VIPRewardHasOneType struct {
	VIPReward
	Types    Type     `gorm:"foreignKey:ID;references:TypeID" json:"types"`
	TypeCard TypeCard `gorm:"foreignKey:ID;references:TypeCardID" json:"typeCard"`
}
